@extends('layouts.admin')

@section('content')
<div class="row">
    <div class="col-lg-12">
        <div class="panel panel-primary">
            <div class="panel-heading">
                <h3 class="panel-title"><i class="fa fa-file"></i> Chỉnh sửa đội</h3>
            </div>
            <div class="panel-body">
                <div class="table-responsive">
                    @if(isset($err))
                    <table class="table table-bordered table-hover table-striped tablesorter">
                        <tbody>
                        <tr>
                            <div class="alert-block">
                                <li>{{ $err }}</li>
                            </div>
                        </tr>
                        </tbody>
                    </table>
                    @endif
                    <table class="table table-bordered table-hover table-striped tablesorter">
                        {{ Form::open(array('url' => 'admin/team-modify', 'method' => 'POST', 'files' => true)) }}
                        <thead>
                        <tr>
                            <th class="header">Tên đội <i class="fa"></i></th>
                            <th class="header">Mô tả <i class="fa"></i></th>
                            <th class="header">Hình ảnh<i class="fa"></i></th>
                            <th class="header">Thao tác <i class="fa"></i></th>
                        </tr>
                        </thead>
                        <tbody>
                        @foreach($teamById as $team)
                        <tr class="active">
                            <td>{{ Form::text('tname', $team->name, array('readonly' => true)) }} {{ Form::hidden('', $team->id , array('name' => 'id' )) }}</td>
                            <td>{{ Form::textarea('tdescription', $team->description,array('rows' => 5)) }}</td>
                            <td>{{ Form::file('timage_file')}}</td>
                            <td>{{ Form::submit('Cập nhật', array('class' => 'btn-primary')) }}</td>
                        </tr>
                        @endforeach
                        </tbody>
                        {{ Form::close() }}
                    </table>
                    {{ HTML::link('admin/team', 'Trang quản lý',array('class' => 'btn btn-primary', 'style' => 'float:right;')) }}
                </div>
            </div>
        </div>
    </div>
</div>
@stop